<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	var init = 5;
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("peopleimage").src="images/child.png";
			document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Dad...there is something I need to tell you first.";
			$("#dialog").click(dialog0);
		}
	);
	
	function dialog0()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>What is it, Jimmy?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog1);
		}
	}
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Dad, I....I...I faked the kidnapping.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>What?!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog3);
		}
	}
	
	function dialog3()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>You were never around, so I thought faking the kidnapping would make you change, so I asked Stephen to help me. I know!! I screw up! Stephen betrayed me and locked me up!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog4);
		}
	}
	
	function dialog4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>That's okay, Son. It's not entirely your fault.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog5);
		}
	}
	
	function dialog5()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Dad, I think I can convince Stephen to let us go. Let me talk to him!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog6);
		}
	}
	
	function dialog6()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "(Stephen enters the room unexpectedly, with a gun in his hand.)";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog7);
		}
	}
	
	function dialog7()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Speak of the devil! Stephen, let us go!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog8);
		}
	}
	
	function dialog8()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says sadly: <br/>Sorry, Jimmy. It's not going to be this easy.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog9);
		}
	}
	
	function dialog9()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/><div onclick=\"dialog10()\">1. Stephen, why do you kidnap Jimmy? Please let him go.</div><div onclick=\"dialog11()\">2. Please let us go.</div>";
	}

	function dialog10()
	{
		window.location = "scene5-1.php";
	}
	
	function dialog11()
	{
		window.location = "scene5-3.php";
	}
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/basement.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>
<audio id="audiotag1" src="audios/pound.mp3" preload="auto"></audio>



</body>
</html>